package online.niuma.xiaocubao.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author 一颗蛋50斤
 * @since 2022-11-06
 */
@Getter
@Setter
@ToString
@TableName("tb_user")
@ApiModel(value = "User对象", description = "")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户id")
    @TableId(value = "user_id", type = IdType.ASSIGN_ID)
    private Long userId;

    @ApiModelProperty("用户的账号")
    private String userAccount;

    @ApiModelProperty("用户的密码")
    private String userPassword;

    @ApiModelProperty("用户的昵称")
    private String userNikename;

    @ApiModelProperty("头像路径")
    private String userAvatar;

    @ApiModelProperty("邮箱")
    private String userEmail;

    @ApiModelProperty("关联的账号")
    private String userToaccount;

    @ApiModelProperty("是否为管理员")
    private Integer userAdmin;

    @ApiModelProperty("状态")
    private Integer userStatus;

    @ApiModelProperty("乐观锁")
    @Version
    private Integer version;

    @ApiModelProperty("逻辑删除")
    @TableLogic
    private Integer deleted;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createtime;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatetime;


}
